package com.jilujia.framework.web;

import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

import com.jilujia.framework.JsoupStringEscapeEditor;

public abstract class AbstractController {

	/**
	 * 暂时只有escapeSQL有效，其他的有乱码问题
	 * 
	 * @param binder
	 */
	// @InitBinder
	// protected void initBinder(ServletRequestDataBinder binder) {
	// binder.registerCustomEditor(String.class, new StringEscapeEditor(false, false, true));
	// }
	@InitBinder
	protected void initBinder(ServletRequestDataBinder binder) {
		binder.registerCustomEditor(String.class, new JsoupStringEscapeEditor());
	}

}
